package xcmg.device.dao.mapper.buyBack;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import xcmg.device.dao.entity.buyBack.BackOutboundDetailDO;

import java.math.BigDecimal;
import java.util.List;

@Mapper
@Repository
public interface BackOutboundDetailMapper {
    int insert(BackOutboundDetailDO record);

    int insertSelective(BackOutboundDetailDO record);

    int updateSendQty(@Param("backOrder") String backOrder, @Param("materialsNo") String materialsNo, @Param("sendQty") BigDecimal sendQty, @Param("orgId") String orgId);

    int updateStatus(@Param("billId") String billId, @Param("materialsNo") String materialsNo, @Param("status") Integer status);

    List<BackOutboundDetailDO> listForLocationUser(@Param("billId") String billId);

    BackOutboundDetailDO findByMaterialNo(@Param("billId") String billId, @Param("materialsNo") String materialsNo);

    int update(BackOutboundDetailDO record);

    List<BackOutboundDetailDO> list(@Param("billId") String billId);

    int deleteByBillIdList(@Param("ids") List<String> ids);
}